<?php
/**
 * 推入新的牢骚
 *
 * @author 纹身特湿 <judasnow@gmail.com>
 */
require_once( './path.php' );

//调用初始化页面
require_once( CLASSMATE_ROOT.'/controller/process_script_init.php' );

@$request = $_POST;

try{

if ( !session::get( 'is_online' ) ){
//未登录不可使用本功能
	 $response_message = array(
			 'type' => 'info' , 
			 'content' => '还没有登录' ,
			 'url_des'=>'现在登录？' ,
			 'url' => '/classmate/controller/account/login.php' );
			 
	 session::set( 'response_message' , $response_message );
	 header( 'Location: ../response_message.php' );
	 exit();
}

$db_connect = mongo_connect();
$user_complaint_process = new user_complaint_process( $db_connect );
if ( $user_complaint_process->post_new( $request ) ){
//成功之后直接从定向到显示页面
	header( 'Location: ./index.php' );
	exit();
}

}catch ( Exception $e ){


}
